<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>弹性盒子布局 | H5学习笔记</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        <meta name="author" content="逍遥派">
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../../gitbook/plugins/gitbook-plugin-expandable-chapters-interactive/expandable-chapters.css">
        
    
        
        <link rel="stylesheet" href="../../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../../md/css/style/reset.html" />
    
    
    <link rel="prev" href="../../../md/css/style/text.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="2.2.13"
        data-chapter-title="弹性盒子布局"
        data-filepath="md/css/style/flex.md"
        data-basepath="../../.."
        data-revision="Fri Dec 29 2017 15:09:42 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="md/html/html.html">
            
                
                    <a href="../../../md/html/html.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        HTML
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="md/html/know.html">
            
                
                    <a href="../../../md/html/know.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        认识页面、以及行内元素和块级元素
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.1" data-path="md/html/a.html">
            
                
                    <a href="../../../md/html/a.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.1.</b>
                        
                        a标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.2" data-path="md/html/path.html">
            
                
                    <a href="../../../md/html/path.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.2.</b>
                        
                        文件路径
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.3" data-path="md/html/img.html">
            
                
                    <a href="../../../md/html/img.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.3.</b>
                        
                        img标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.4" data-path="md/html/area.html">
            
                
                    <a href="../../../md/html/area.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.4.</b>
                        
                        锚点和热区
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.5" data-path="md/html/table.html">
            
                
                    <a href="../../../md/html/table.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.5.</b>
                        
                        表格
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.6" data-path="md/html/media.html">
            
                
                    <a href="../../../md/html/media.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.6.</b>
                        
                        音频与视频
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.7" data-path="md/html/list.html">
            
                
                    <a href="../../../md/html/list.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.7.</b>
                        
                        列表
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.8" data-path="md/html/jframe.html">
            
                
                    <a href="../../../md/html/jframe.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.8.</b>
                        
                        内嵌页面
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.9" data-path="md/html/icon.html">
            
                
                    <a href="../../../md/html/icon.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.9.</b>
                        
                        网页icon
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.10" data-path="md/html/character.html">
            
                
                    <a href="../../../md/html/character.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.10.</b>
                        
                        实体字符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.11" data-path="md/html/form.html">
            
                
                    <a href="../../../md/html/form.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.11.</b>
                        
                        form表单
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.12" data-path="md/html/input.html">
            
                
                    <a href="../../../md/html/input.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.12.</b>
                        
                        input标签
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.12.1" data-path="md/html/input/radio.html">
            
                
                    <a href="../../../md/html/input/radio.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.12.1.</b>
                        
                        radio
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.12.2" data-path="md/html/input/checkbox.html">
            
                
                    <a href="../../../md/html/input/checkbox.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.12.2.</b>
                        
                        checkbox
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.12.3" data-path="md/html/input/select.html">
            
                
                    <a href="../../../md/html/input/select.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.12.3.</b>
                        
                        select
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.12.4" data-path="md/html/input/file.html">
            
                
                    <a href="../../../md/html/input/file.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.12.4.</b>
                        
                        file
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.12.5" data-path="md/html/input/textarea.html">
            
                
                    <a href="../../../md/html/input/textarea.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.12.5.</b>
                        
                        textarea
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.12.6" data-path="md/html/input/button.html">
            
                
                    <a href="../../../md/html/input/button.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.12.6.</b>
                        
                        button
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="md/css/css.html">
            
                
                    <a href="../../../md/css/css.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        CSS
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="md/css/selector.html">
            
                
                    <a href="../../../md/css/selector.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        CSS选择器
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.1" data-path="md/css/selector/element.html">
            
                
                    <a href="../../../md/css/selector/element.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.1.</b>
                        
                        元素选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.2" data-path="md/css/selector/class.html">
            
                
                    <a href="../../../md/css/selector/class.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.2.</b>
                        
                        类选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.3" data-path="md/css/selector/id.html">
            
                
                    <a href="../../../md/css/selector/id.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.3.</b>
                        
                        ID选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.4" data-path="md/css/selector/descendant.html">
            
                
                    <a href="../../../md/css/selector/descendant.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.4.</b>
                        
                        后代选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.5" data-path="md/css/selector/child.html">
            
                
                    <a href="../../../md/css/selector/child.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.5.</b>
                        
                        子元素选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.6" data-path="md/css/selector/general.html">
            
                
                    <a href="../../../md/css/selector/general.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.6.</b>
                        
                        兄弟选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.7" data-path="md/css/selector/adjacent.html">
            
                
                    <a href="../../../md/css/selector/adjacent.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.7.</b>
                        
                        相邻选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.8" data-path="md/css/selector/pseudo.html">
            
                
                    <a href="../../../md/css/selector/pseudo.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.8.</b>
                        
                        伪类选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.9" data-path="md/css/selector/att.html">
            
                
                    <a href="../../../md/css/selector/att.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.9.</b>
                        
                        属性选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.10" data-path="md/css/selector/object.html">
            
                
                    <a href="../../../md/css/selector/object.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.10.</b>
                        
                        伪对象选择符
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="md/css/style.html">
            
                
                    <a href="../../../md/css/style.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        CSS样式属性
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1" data-path="md/css/style/font.html">
            
                
                    <a href="../../../md/css/style/font.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.1.</b>
                        
                        font属性
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.2" data-path="md/css/style/color.html">
            
                
                    <a href="../../../md/css/style/color.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.2.</b>
                        
                        color属性
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.3" data-path="md/css/style/text-decoration.html">
            
                
                    <a href="../../../md/css/style/text-decoration.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.3.</b>
                        
                        text-decoration属性
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.4" data-path="md/css/style/text-shadow.html">
            
                
                    <a href="../../../md/css/style/text-shadow.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.4.</b>
                        
                        text-shadow属性
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.5" data-path="md/css/style/border.html">
            
                
                    <a href="../../../md/css/style/border.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.5.</b>
                        
                        border属性
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.6" data-path="md/css/style/box.html">
            
                
                    <a href="../../../md/css/style/box.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.6.</b>
                        
                        box盒子模型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.7" data-path="md/css/style/display.html">
            
                
                    <a href="../../../md/css/style/display.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.7.</b>
                        
                        diplay属性
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.8" data-path="md/css/style/float.html">
            
                
                    <a href="../../../md/css/style/float.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.8.</b>
                        
                        float浮动
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.9" data-path="md/css/style/align.html">
            
                
                    <a href="../../../md/css/style/align.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.9.</b>
                        
                        对齐属性
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.10" data-path="md/css/style/position.html">
            
                
                    <a href="../../../md/css/style/position.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.10.</b>
                        
                        定位属性
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.11" data-path="md/css/style/image.html">
            
                
                    <a href="../../../md/css/style/image.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.11.</b>
                        
                        图片处理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.12" data-path="md/css/style/text.html">
            
                
                    <a href="../../../md/css/style/text.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.12.</b>
                        
                        文本属性
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="2.2.13" data-path="md/css/style/flex.html">
            
                
                    <a href="../../../md/css/style/flex.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.13.</b>
                        
                        弹性盒子布局
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.14" data-path="md/css/style/reset.html">
            
                
                    <a href="../../../md/css/style/reset.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.14.</b>
                        
                        css初始化
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="md/gitbook/introduce.html">
            
                
                    <a href="../../../md/gitbook/introduce.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        gitbook
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="md/gitbook/use.html">
            
                
                    <a href="../../../md/gitbook/use.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        gitbook安装及使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="md/gitbook/mardown.html">
            
                
                    <a href="../../../md/gitbook/mardown.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        Markdown编辑器语法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="md/gitbook/plugins.html">
            
                
                    <a href="../../../md/gitbook/plugins.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        Markdown插件安装配置
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="md/git/git.html">
            
                
                    <a href="../../../md/git/git.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        git介绍
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="md/git/use.html">
            
                
                    <a href="../../../md/git/use.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        git安装使用
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="md/node.js/introduce.html">
            
                
                    <a href="../../../md/node.js/introduce.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        NodeJs
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="md/node.js/nvm.html">
            
                
                    <a href="../../../md/node.js/nvm.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        nvm管理nodejs
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="md/node.js/npm.html">
            
                
                    <a href="../../../md/node.js/npm.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        npm介绍及使用
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../../" >H5学习笔记</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h2 id="&#x5F39;&#x6027;&#x76D2;&#x5B50;&#x5E03;&#x5C40;">&#x5F39;&#x6027;&#x76D2;&#x5B50;&#x5E03;&#x5C40;</h2>
<p>&#x91C7;&#x7528;Flex&#x5E03;&#x5C40;&#x7684;&#x5143;&#x7D20;&#xFF0C;&#x79F0;&#x4E3A;Flex&#x5BB9;&#x5668;&#xFF08;flex container&#xFF09;&#xFF0C;&#x7B80;&#x79F0;&quot;&#x5BB9;&#x5668;&quot;.
&#x5B83;&#x7684;&#x6240;&#x6709;&#x5B50;&#x5143;&#x7D20;&#x81EA;&#x52A8;&#x6210;&#x4E3A;&#x5BB9;&#x5668;&#x6210;&#x5458;&#xFF0C;&#x79F0;&#x4E3A;Flex&#x9879;&#x76EE;&#xFF08;flex item&#xFF09;&#xFF0C;&#x7B80;&#x79F0;&quot;&#x9879;&#x76EE;&quot;&#x3002;</p>
<h3 id="&#x5F39;&#x6027;&#x76D2;&#x5B50;&#x7684;&#x6392;&#x5217;&#x65B9;&#x5F0F;">&#x5F39;&#x6027;&#x76D2;&#x5B50;&#x7684;&#x6392;&#x5217;&#x65B9;&#x5F0F;</h3>
<h4 id="&#x4E3B;&#x8F74;&#x4F38;&#x7F29;&#x65B9;&#x5411;">&#x4E3B;&#x8F74;&#x4F38;&#x7F29;&#x65B9;&#x5411;</h4>
<table>
<thead>
<tr>
<th style="text-align:center">&#x5C5E;&#x6027;</th>
<th style="text-align:center">&#x503C;</th>
<th style="text-align:center">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">flex-direction</td>
<td style="text-align:center">row<br>row-reverse</td>
<td style="text-align:center">&#x4ECE;&#x5DE6;&#x5F80;&#x53F3;&#x6C34;&#x5E73;&#x6392;&#x5217;<br>&#x4ECE;&#x53F3;&#x5230;&#x5DE6;&#x6C34;&#x5E73;&#x6392;&#x5217;</td>
</tr>
<tr>
<td style="text-align:center">flex-direction</td>
<td style="text-align:center">column<br>column-reverse</td>
<td style="text-align:center">&#x4ECE;&#x4E0A;&#x5F80;&#x4E0B;&#x5782;&#x76F4;&#x6392;&#x5217;<br>&#x4ECE;&#x4E0B;&#x5F80;&#x4E0A;&#x5782;&#x76F4;&#x6392;&#x5217;</td>
</tr>
</tbody>
</table>
<p><strong>&#x6CE8;&#x610F;&#x70B9;:</strong>&#x4E3B;&#x8F74;&#x4F38;&#x7F29;&#x65B9;&#x5411;&#x9ED8;&#x8BA4;&#x4E3A;row(&#x4ECE;&#x5DE6;&#x5230;&#x53F3;&#x6C34;&#x5E73;)</p>
<h4 id="&#x6307;&#x5B9A;&#x4F38;&#x7F29;&#x9879;&#x76EE;&#x6362;&#x884C;">&#x6307;&#x5B9A;&#x4F38;&#x7F29;&#x9879;&#x76EE;&#x6362;&#x884C;</h4>
<table>
<thead>
<tr>
<th style="text-align:center">&#x5C5E;&#x6027;</th>
<th style="text-align:center">&#x503C;</th>
<th style="text-align:center">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">flex-warp</td>
<td style="text-align:center">warp</td>
<td style="text-align:center">&#x6362;&#x884C;</td>
</tr>
<tr>
<td style="text-align:center">flex-warp</td>
<td style="text-align:center">nowarp</td>
<td style="text-align:center">&#x4E0D;&#x6362;&#x884C;</td>
</tr>
<tr>
<td style="text-align:center">flex-warp</td>
<td style="text-align:center">nowarp-reverse</td>
<td style="text-align:center">&#x591A;&#x884C;&#x663E;&#x793A;&#xFF0C;&#x7B2C;&#x4E00;&#x884C;&#x5728;&#x4E0B;&#x65B9;</td>
</tr>
</tbody>
</table>
<p><strong>&#x6CE8;&#x610F;&#x70B9;:</strong>&#x9ED8;&#x8BA4;&#x60C5;&#x51B5;&#x4E4B;&#x4E0B;&#xFF0C;Flex&#x9879;&#x76EE;&#x5728;&#x4E00;&#x884C;&#x663E;&#x793A;,&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x8BBE;&#x7F6E;&#x6362;&#x884C;&#xFF0C;&#x8BA9;&#x9879;&#x76EE;&#x7684;&#x5BBD;&#x5EA6;&#x4E0D;&#x4F1A;&#x56E0;&#x4E3A;&#x7236;&#x5BB9;&#x5668;&#x7684;&#x5BBD;&#x5EA6;&#x4E0D;&#x591F;&#x800C;&#x8FDB;&#x884C;&#x6324;&#x538B;&#x53D8;&#x5C0F;</p>
<p>&#x53EF;&#x4EE5;&#x901A;&#x8FC7;<code>flex-flow:column warp</code>&#x6765;&#x76F4;&#x63A5;&#x8BBE;&#x7F6E;&#x4E3B;&#x8F74;&#x4F38;&#x7F29;&#x65B9;&#x5411;&#x548C;&#x6362;&#x884C;</p>
<h4 id="&#x6A2A;&#x8F74;&#x5BF9;&#x9F50;&#x65B9;&#x5F0F;">&#x6A2A;&#x8F74;&#x5BF9;&#x9F50;&#x65B9;&#x5F0F;</h4>
<table>
<thead>
<tr>
<th style="text-align:center">&#x5C5E;&#x6027;</th>
<th style="text-align:center">&#x503C;</th>
<th style="text-align:center">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">justify-content</td>
<td style="text-align:center">flex-start</td>
<td style="text-align:center">&#x5DE6;&#x5BF9;&#x9F50;</td>
</tr>
<tr>
<td style="text-align:center">justify-content</td>
<td style="text-align:center">flex-end</td>
<td style="text-align:center">&#x53F3;&#x5BF9;&#x9F50;</td>
</tr>
<tr>
<td style="text-align:center">justify-content</td>
<td style="text-align:center">center</td>
<td style="text-align:center">&#x5C45;&#x4E2D;</td>
</tr>
<tr>
<td style="text-align:center">justify-content</td>
<td style="text-align:center">space-between</td>
<td style="text-align:center">&#x4E24;&#x7AEF;&#x5BF9;&#x9F50;&#xFF0C;&#x95F4;&#x9694;&#x76F8;&#x7B49;</td>
</tr>
<tr>
<td style="text-align:center">justify-content</td>
<td style="text-align:center">space-around</td>
<td style="text-align:center">&#x6BCF;&#x4E2A;&#x9879;&#x76EE;&#x4E24;&#x4FA7;&#x7684;&#x95F4;&#x9694;&#x76F8;&#x7B49;&#xFF0C;&#x9879;&#x76EE;&#x4E4B;&#x95F4;&#x7684;&#x95F4;&#x9694;&#x6BD4;&#x9879;&#x76EE;&#x4E0E;&#x8FB9;&#x6846;&#x7684;&#x95F4;&#x9694;&#x5927;&#x4E00;&#x500D;</td>
</tr>
</tbody>
</table>
<p><strong>&#x6CE8;&#x610F;&#x70B9;:</strong>align-items&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x4F7F;&#x7528;&#x5728;&#x6A2A;&#x8F74;&#x91CC;&#xFF0C;&#x5B9E;&#x73B0;&#x6574;&#x4E00;&#x5757;&#x5782;&#x76F4;&#x5BF9;&#x9F50;</p>
<pre><code>&lt;style type=&quot;text/css&quot;&gt;
.baba{
    display: inline-flex;
    background: skyblue;
    width: 600px;
    height: 300px;
    justify-content:center; /*&#x6C34;&#x5E73;&#x5C45;&#x4E2D;
}
.baba p{
    width: 100px;
    height: 100px;
}
&lt;/style&gt;

&lt;div class=&quot;baba&quot;&gt;
    &lt;p&gt;111&lt;/p&gt;
    &lt;p&gt;222&lt;/p&gt;
    &lt;p&gt;333&lt;/p&gt;
    &lt;p&gt;444&lt;/p&gt;
    &lt;p&gt;555&lt;/p&gt;
    &lt;p&gt;666&lt;/p&gt;
&lt;/div&gt;
</code></pre><h4 id="&#x4FA7;&#x8F74;&#x5BF9;&#x9F50;&#x65B9;&#x5F0F;">&#x4FA7;&#x8F74;&#x5BF9;&#x9F50;&#x65B9;&#x5F0F;</h4>
<table>
<thead>
<tr>
<th style="text-align:center">&#x5C5E;&#x6027;</th>
<th style="text-align:center">&#x503C;</th>
<th style="text-align:center">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">align-items</td>
<td style="text-align:center">flex-start</td>
<td style="text-align:center">&#x5DE6;&#x5BF9;&#x9F50;</td>
</tr>
<tr>
<td style="text-align:center">align-items</td>
<td style="text-align:center">flex-end</td>
<td style="text-align:center">&#x53F3;&#x5BF9;&#x9F50;</td>
</tr>
<tr>
<td style="text-align:center">align-items</td>
<td style="text-align:center">center</td>
<td style="text-align:center">&#x5C45;&#x4E2D;</td>
</tr>
<tr>
<td style="text-align:center">align-items</td>
<td style="text-align:center">baseline</td>
<td style="text-align:center">&#x9879;&#x76EE;&#x7B2C;&#x4E00;&#x884C;&#x6587;&#x5B57;&#x57FA;&#x7EBF;&#x5BF9;&#x9F50;</td>
</tr>
<tr>
<td style="text-align:center">align-items</td>
<td style="text-align:center">stretch(&#x9ED8;&#x8BA4;&#x503C;)</td>
<td style="text-align:center">&#x5982;&#x679C;&#x9879;&#x76EE;&#x672A;&#x8BBE;&#x7F6E;&#x9AD8;&#x5EA6;&#x6216;&#x8BBE;&#x4E3A;auto&#xFF0C;&#x5C06;&#x5360;&#x6EE1;&#x6574;&#x4E2A;&#x5BB9;&#x5668;&#x7684;&#x9AD8;&#x5EA6;</td>
</tr>
</tbody>
</table>
<pre><code>.baba{
    display: inline-flex;
    background: skyblue;
    width: 600px;
    height: 300px;
    flex-direction: column;/*&#x8BBE;&#x7F6E;&#x4E3A;&#x4FA7;&#x8F74;&#x4F38;&#x7F29;
    align-item:flex-end    /*&#x53F3;&#x5BF9;&#x9F50;*/
}
.baba p{
    width: 100px;
    height: 100px;
}
&lt;/style&gt;

&lt;div class=&quot;baba&quot;&gt;
    &lt;p&gt;111&lt;/p&gt;
    &lt;p&gt;222&lt;/p&gt;
    &lt;p&gt;333&lt;/p&gt;
    &lt;p&gt;444&lt;/p&gt;
    &lt;p&gt;555&lt;/p&gt;
    &lt;p&gt;666&lt;/p&gt;
&lt;/div&gt;
</code></pre><h5 id="&#x5355;&#x4E2A;&#x9879;&#x76EE;&#x4FA7;&#x8F74;&#x5BF9;&#x9F50;&#x65B9;&#x5F0F;">&#x5355;&#x4E2A;&#x9879;&#x76EE;&#x4FA7;&#x8F74;&#x5BF9;&#x9F50;&#x65B9;&#x5F0F;</h5>
<table>
<thead>
<tr>
<th style="text-align:center">&#x5C5E;&#x6027;</th>
<th style="text-align:center">&#x503C;</th>
<th style="text-align:center">&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">align-self</td>
<td style="text-align:center">flex-start</td>
<td style="text-align:center">&#x5DE6;&#x5BF9;&#x9F50;</td>
</tr>
<tr>
<td style="text-align:center">align-self</td>
<td style="text-align:center">flex-end</td>
<td style="text-align:center">&#x53F3;&#x5BF9;&#x9F50;</td>
</tr>
<tr>
<td style="text-align:center">align-self</td>
<td style="text-align:center">center</td>
<td style="text-align:center">&#x5C45;&#x4E2D;</td>
</tr>
<tr>
<td style="text-align:center">align-self</td>
<td style="text-align:center">baseline</td>
<td style="text-align:center">&#x9879;&#x76EE;&#x7B2C;&#x4E00;&#x884C;&#x6587;&#x5B57;&#x57FA;&#x7EBF;&#x5BF9;&#x9F50;</td>
</tr>
<tr>
<td style="text-align:center">align-self</td>
<td style="text-align:center">stretch(&#x9ED8;&#x8BA4;&#x503C;)</td>
<td style="text-align:center">&#x5982;&#x679C;&#x9879;&#x76EE;&#x672A;&#x8BBE;&#x7F6E;&#x9AD8;&#x5EA6;&#x6216;&#x8BBE;&#x4E3A;auto&#xFF0C;&#x5C06;&#x5360;&#x6EE1;&#x6574;&#x4E2A;&#x5BB9;&#x5668;&#x7684;&#x9AD8;&#x5EA6;</td>
</tr>
</tbody>
</table>
<pre><code>.baba{
    display: inline-flex;
    background: skyblue;
    width: 600px;
    height: 300px;
    flex-direction: column;/*&#x8BBE;&#x7F6E;&#x4E3A;&#x4FA7;&#x8F74;&#x4F38;&#x7F29;
}
.baba p{
    width: 100px;
    height: 100px;
}
.baba p:last-child{
    align-self:flex-end        /&#x8BBE;&#x7F6E;&#x5355;&#x4E2A;p&#x53F3;&#x5BF9;&#x9F50;
}
&lt;/style&gt;

&lt;div class=&quot;baba&quot;&gt;
    &lt;p&gt;111&lt;/p&gt;
    &lt;p&gt;222&lt;/p&gt;
    &lt;p&gt;333&lt;/p&gt;

&lt;/div&gt;
</code></pre><h4 id="&#x6307;&#x5B9A;&#x4F38;&#x7F29;&#x9879;&#x76EE;&#x7684;&#x987A;&#x5E8F;">&#x6307;&#x5B9A;&#x4F38;&#x7F29;&#x9879;&#x76EE;&#x7684;&#x987A;&#x5E8F;</h4>
<p>&#x5728;Flex&#x5BB9;&#x5668;&#x4E2D;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;order&#x5C5E;&#x6027;&#x6765;&#x63A7;&#x5236;Flex&#x9879;&#x76EE;&#x7684;&#x987A;&#x5E8F;&#x6E90;&#x3002;</p>
<pre><code>&#x9ED8;&#x8BA4;&#x503C;&#x4E3A;0&#xFF0C;&#x652F;&#x6301;&#x6B63;&#x8D1F;&#x6574;&#x6570;&#xFF0C;&#x503C;&#x8D8A;&#x5C0F;&#xFF0C;&#x8D8A;&#x9760;&#x524D;
</code></pre><pre><code>.baba{
    display: inline-flex;
    background: skyblue;
    width: 600px;
    height: 300px;
    flex-direction: column;/*&#x8BBE;&#x7F6E;&#x4E3A;&#x4FA7;&#x8F74;&#x4F38;&#x7F29;
}
.baba p{
    width: 100px;
    height: 100px;
}
.baba p:last-child{
    align-self:flex-end        /*&#x8BBE;&#x7F6E;&#x5355;&#x4E2A;p&#x53F3;&#x5BF9;&#x9F50;*/
    order:-1;                 /*&#x8BA9;&#x6700;&#x540E;&#x4E00;&#x4E2A;p&#x6392;&#x5217;&#x5728;&#x6700;&#x524D;&#x9762;
}
&lt;/style&gt;

&lt;div class=&quot;baba&quot;&gt;
    &lt;p&gt;111&lt;/p&gt;
    &lt;p&gt;222&lt;/p&gt;
    &lt;p&gt;333&lt;/p&gt;
&lt;/div&gt;
</code></pre><h3 id="&#x9879;&#x76EE;&#x7684;&#x653E;&#x5927;&#x548C;&#x7F29;&#x5C0F;">&#x9879;&#x76EE;&#x7684;&#x653E;&#x5927;&#x548C;&#x7F29;&#x5C0F;</h3>
<h4 id="&#x9879;&#x76EE;&#x7684;&#x653E;&#x5927;&#x6BD4;&#x4F8B;-&#x2014;&#x2014;-flexgrow">&#x9879;&#x76EE;&#x7684;&#x653E;&#x5927;&#x6BD4;&#x4F8B; &#x2014;&#x2014; flex-grow</h4>
<p>&#x5F53;&#x7236;&#x5BB9;&#x5668;&#x8FD8;&#x6709;&#x5269;&#x4F59;&#x7A7A;&#x95F4;</p>
<p>1.&#x9ED8;&#x8BA4;&#x4E3A;0,&#x7236;&#x5BB9;&#x5668;&#x7684;&#x5269;&#x4F59;&#x7A7A;&#x95F4;&#x4E0D;&#x4F1A;&#x88AB;&#x69A8;&#x5E72;
2.&#x5982;&#x679C;&#x7ED9;&#x5355;&#x72EC;&#x7684;&#x9879;&#x76EE;&#x8BBE;&#x7F6E;1&#xFF0C;&#x90A3;&#x4E48;&#x8FD9;&#x4E2A;&#x9879;&#x76EE;&#x4F1A;&#x5B8C;&#x5168;&#x628A;&#x7236;&#x5BB9;&#x5668;&#x7684;&#x5269;&#x4F59;&#x7A7A;&#x95F4;&#x69A8;&#x5E72;&#xFF0C;&#x5176;&#x4ED6;&#x4E0D;&#x53D8;
3.&#x5982;&#x679C;&#x7ED9;&#x6240;&#x6709;&#x9879;&#x76EE;&#x8BBE;&#x7F6E;1&#xFF0C;&#x90A3;&#x4E48;&#x8FD9;&#x4E9B;&#x9879;&#x76EE;&#x4F1A;&#x5B8C;&#x5168;&#x5E73;&#x5206;&#x7236;&#x5BB9;&#x5668;&#x7684;&#x5269;&#x4F59;&#x7A7A;&#x95F4;
4.flex-grow&#x53D6;&#x8D1F;&#x503C;&#x5C06;&#x5B9E;&#x6548;</p>
<h4 id="&#x9879;&#x76EE;&#x7684;&#x7F29;&#x5C0F;&#x6BD4;&#x4F8B;-&#x2014;&#x2014;-flexshrink">&#x9879;&#x76EE;&#x7684;&#x7F29;&#x5C0F;&#x6BD4;&#x4F8B; &#x2014;&#x2014; flex-shrink</h4>
<p>&#x5F53;&#x7236;&#x5BB9;&#x5668;&#x7A7A;&#x95F4;&#x4E0D;&#x8DB3;</p>
<p>1.&#x5982;&#x679C;&#x7ED9;&#x5355;&#x72EC;&#x7684;&#x9879;&#x76EE;&#x8BBE;&#x7F6E;0&#xFF0C;&#x5176;&#x4ED6;&#x8BBE;&#x7F6E;1&#xFF0C;&#x90A3;&#x4E48;&#x524D;&#x8005;&#x4E0D;&#x53D8;&#xFF0C;&#x540E;&#x8005;&#x591A;&#x7F29;&#x5C0F;1/n&#x7684;&#x6BD4;&#x4F8B;
2.&#x5982;&#x679C;&#x7ED9;&#x6240;&#x6709;&#x9879;&#x76EE;&#x8BBE;&#x7F6E;1&#xFF0C;&#x9879;&#x76EE;&#x4F1A;&#x81EA;&#x5DF1;&#x7F29;&#x5C0F;&#x6BD4;&#x4F8B;&#x5E73;&#x5747;&#x6BD4;&#x4F8B;&#x7F29;&#x5C0F;
3.flex-grow&#x53D6;&#x8D1F;&#x503C;&#x5C06;&#x5B9E;&#x6548;</p>
<h4 id="&#x9879;&#x76EE;&#x7684;&#x653E;&#x5927;&#x6BD4;&#x4F8B;-&#x2014;&#x2014;-flexbasis">&#x9879;&#x76EE;&#x7684;&#x653E;&#x5927;&#x6BD4;&#x4F8B; &#x2014;&#x2014; flex-basis</h4>
<p>&#x5F53;&#x7236;&#x5BB9;&#x5668;&#x8FD8;&#x6709;&#x5269;&#x4F59;&#x7A7A;&#x95F4;</p>
<p>&#x76F4;&#x63A5;&#x8BBE;&#x7F6E;&#x5355;&#x4E2A;&#x9879;&#x76EE;&#x7684;&#x503C;&#xFF0C;&#x5176;&#x4ED6;&#x6309;&#x6BD4;&#x4F8B;&#x653E;&#x5927;</p>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../../md/css/style/text.html" class="navigation navigation-prev " aria-label="Previous page: 文本属性"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../../md/css/style/reset.html" class="navigation navigation-next " aria-label="Next page: css初始化"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../../gitbook/app.js"></script>

    
    <script src="../../../gitbook/plugins/gitbook-plugin-expandable-chapters-interactive/expandable-chapters.js"></script>
    

    
    <script src="../../../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../../../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../../../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../../../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"expandable-chapters-interactive":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
